<template>
  <div class="container">
      <top-nav :toLastPath="true" >我的关注</top-nav>
    <workList1 :workList="list" :type="guan" class="workList"></workList1>
  </div>
</template>

<script>
import workList1 from '@/components/workList'
import topNav from '@/components/topNav';
export default {
  data () {
    return {
      list:"",
      guan:"guan"
    }
  },
  computed:{
   
  },
  components: {
    workList1,
    topNav
  },

  methods: {
    async getList(){
      var userToken=window.localStorage.getItem('userToken')
      let res=await this.$axios('/ucenter/getUserFollowPositionList',{params:{user_token:userToken}})
      for([index,value] of res.data.data.entries()){
        value.created_at=value.created_at.split(" ")[0]
      }
      this.list=res.data.data;
      for(let [index,value] of this.list.entries()){
        value.sex=this.$currency.sexTag1(value.sex)
      }
    }
  },
  activated(){
    this.getList();
  }
}
</script>

<style scoped>
/* .container{background-color: #f0f2f5;} */
.container ul{width: 100%;}
.container ul li{height: 60px;display: flex;justify-content: row;background-color: #fff;margin-bottom: 10px;}
.headerImg{width: 50px;height: 50px;margin-top: 5px;position: relative;}
.headerImg img{position: absolute;width: 50px;height: 50px;left: 10px;top: 0;}
.headerImg div{width: 10px;height: 10px;position: absolute;right: -5px;top: -5px;background: #FF0000;border-radius: 10px;}
.name{width: 170px;line-height: 60px;font-size: 17px;color: #000000;letter-spacing: 0;margin-left: 20px;}
.time{font-size: 14px;color: #8E8E93;line-height: 60px;}
.workList{
    margin-top: 50px !important;
}
</style>
